class CreatePhotos < ActiveRecord::Migration
  def self.up
    create_table :photos do |t|
      t.column :user_id,:string
      #以下列是attachment_fu需要的列
      t.column :content_type,:string,:limit=>100
      t.column :filename,:string,:limit=>255
      t.column :path,:string,:limit=>255
      t.column :parent_id,:integer
      t.column :thumbnail,:string,:limit=>255
      t.column :size,:integer
      t.column :width,:integer
      t.column :height,:integer
      t.timestamps
    end
  end

  def self.down
    drop_table :photos
  end
end
